﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Runtime.Serialization;

namespace NextGenSystems.WHMCS
{
    [DataContract()]
  public   class GetInvoiceRS : WHMCSBASE
    {
        #region Attributes

        private int _TotalResults;
        private int _StartNumber;
        private int _NumReturned;
        private List<Invoice> _Invoice;

        #endregion

        #region Properties

        [DataMember()]
        public List<Invoice> Invoice
        {
            get { return _Invoice; }
            set
            {
                if (_Invoice != value)
                {
                    _Invoice = value;
                }
            }
        }

        [DataMember()]
        public virtual int TotalResults
        {
            get { return _TotalResults; }
            set
            {
                if (_TotalResults != value)
                {
                    _TotalResults = value;
                    NotifyPropertyChanged("TotalResults");
                }
            }
        }

        [DataMember()]
        public virtual int StartNumber
        {
            get { return _StartNumber; }
            set
            {
                if (_StartNumber != value)
                {
                    _StartNumber = value;
                    NotifyPropertyChanged("StartNumber");
                }
            }
        }

        [DataMember()]
        public virtual int NumReturned
        {
            get { return _NumReturned; }
            set
            {
                if (_NumReturned != value)
                {
                    _NumReturned = value;
                    NotifyPropertyChanged("NumReturned");
                }
            }
        }

        #endregion

    }

    public class Invoice
    {
        #region Attributes
        private String _Invoiceid;
        private String _Invoicenum;
        private String _Userid;
        private String _Date;
        private String _Duedate;
        private String _Datepaid;
        private String _Subtotal;
        private String _Credit;
        private String _Tax;
        private String _Tax2;
        private String _Total;
        private String _Taxrate;
        private String _Taxrate2;
        private String _Status;
        private String _Paymentmethod;
        private String _Notes;
        private List<Item> _Items;
        private string _transactions;
        #endregion

        #region Properties

        [DataMember()]
        public String Invoiceid
        {
            get { return _Invoiceid; }
            set { _Invoiceid = value; }
        }
        [DataMember()]
        public String Invoicenum
        {
            get { return _Invoicenum; }
            set { _Invoicenum = value; }
        }
        [DataMember()]
        public String Userid
        {
            get { return _Userid; }
            set { _Userid = value; }
        }

        [DataMember()]
        public String Date
        {
            get { return _Date; }
            set { _Date = value; }
        }
      
        [DataMember()]
        public String Duedate
        {
            get { return _Duedate; }
            set { _Duedate = value; }
        }
      
        [DataMember()]
        public String Datepaid
        {
            get { return _Datepaid; }
            set { _Datepaid = value; }
        }
       
        [DataMember()]
        public String Subtotal
        {
            get { return _Subtotal; }
            set { _Subtotal = value; }
        }
      
        [DataMember()]
        public String Credit
        {
            get { return _Credit; }
            set { _Credit = value; }
        }
      
        [DataMember()]
        public String Tax
        {
            get { return _Tax; }
            set { _Tax = value; }
        }
      
        [DataMember()]
        public String Tax2
        {
            get { return _Tax2; }
            set { _Tax2 = value; }
        }
      
        [DataMember()]
        public String Total
        {
            get { return _Total; }
            set { _Total = value; }
        }
      
        [DataMember()]
        public String Taxrate
        {
            get { return _Taxrate; }
            set { _Taxrate = value; }
        }
       
        [DataMember()]
        public String Taxrate2
        {
            get { return _Taxrate2; }
            set { _Taxrate2 = value; }
        }
       
        [DataMember()]
        public String Status
        {
            get { return _Status; }
            set { _Status = value; }
        }

        [DataMember()]
        public String Paymentmethod
        {
            get { return _Paymentmethod; }
            set { _Paymentmethod = value; }
        }

        [DataMember()]
        public String Notes
        {
            get { return _Notes; }
            set { _Notes = value; }
        }

        [DataMember()]
        public List< Item> Items
        {
            get { return _Items; }
            set { _Items = value; }
        }
         [DataMember()]
        public string Transactions
        {
            get { return _transactions; }
            set { _transactions = value; }
        }
        #endregion
    }

    public class Item
    {
        #region Attributes

        private String _Id;
        private String _Type;
        private String _Relid;
        private String _Description;
        private String _Amount;
        private String _Taxed;

        #endregion

        #region Properties

        [DataMember()]
        public String Id
        {
            get { return _Id; }
            set { _Id = value; }
        }
      
        [DataMember()]
        public String Type
        {
            get { return _Type; }
            set { _Type = value; }
        }
      
        [DataMember()]
        public String Relid
        {
            get { return _Relid; }
            set { _Relid = value; }
        }
     
        [DataMember()]
        public String Description
        {
            get { return _Description; }
            set { _Description = value; }
        }
     
        [DataMember()]
        public String Amount
        {
            get { return _Amount; }
            set { _Amount = value; }
        }
     
        [DataMember()]
        public String Taxed
        {
            get { return _Taxed; }
            set { _Taxed = value; }
        }

        #endregion
    }
}
